{template 'public/header'}

{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/yzzc_sun/template/public/ygcsslist.css">
<style type="text/css">
</style>
<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>
    <li class="active"><a href="javascript:void(0);">积分列表</a></li>
</ul>

<div class="row ygrow">
    <form action="" method="get" class="col-md-4">
        <input type="hidden" name="c" value="site" />
        <input type="hidden" name="a" value="entry" />
        <input type="hidden" name="m" value="yzzc_sun" />
        <input type="hidden" name="do" value="record" />

        <input type="hidden" name="token" value="{$_W['token']}"/>

    </form>
</div>
<div class="main">
    <div class="panel panel-default">

        <div class="panel-heading">
            积分明细
        </div>

        <div class="panel-body" style="padding: 0px 15px;">

            <div class="row">

                <table class="yg5_tabel col-md-12">
                    <tr class="yg5_tr1">
                        <td class="col-md-1">用户id</td>
                        <td class="col-md-2">积分</td>
                        <td class="col-md-1">积分类型</td>
                        <td class="col-md-2">时间</td>
                        <!--<td class="col-md-2">操作</td>-->
                    </tr>

                    {loop $list $row}

                    <tr class="yg5_tr2">

                        <td >{$row['uid']}</td>
                        <td>{$row['score']}</td>

                        {if $row['type'] == 1}  <td>签到得积分</td>
                        {elseif $row['type'] == 2}<td>兑换租车券</td>
                        {elseif $row['type'] == 3}<td>消费得积分</td>
                        {elseif $row['type'] == 4}<td>租车抵现</td>
                        {/if}
                        <td> {$row['createtime']}</td>

                    </tr>

                    <div class="modal fade" id="myModal{$row['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                        <div class="modal-dialog" role="document">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
                                </div>
                                <div class="modal-body" style="font-size: 20px">
                                    确定删除么？
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                    <a href="{php echo $this->createWebUrl('record', array('op' => 'delete', 'id' => $row['id']))}" type="button" class="btn btn-info" >确定</a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 拉黑 -->
                    <div class="modal fade" id="myModal2{$row['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                        <div class="modal-dialog" role="document">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
                                </div>
                                <div class="modal-body" style="font-size: 20px">
                                    确定拉黑么？
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                    <a href="{php echo $this->createWebUrl('record', array('op' => 'defriend', 'id' => $row['id'],'page'=>$_GPC['page']))}" type="button" class="btn btn-info" >确定</a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 解除拉黑 -->
                    <div class="modal fade" id="myModal3{$row['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                        <div class="modal-dialog" role="document">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
                                </div>
                                <div class="modal-body" style="font-size: 20px">
                                    确定取消拉黑么？
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                    <a href="{php echo $this->createWebUrl('record', array('op' => 'relieve', 'id' => $row['id'],'page'=>$_GPC['page']))}" type="button" class="btn btn-info" >确定</a>
                                </div>
                            </div>
                        </div>
                    </div>


                    {/loop}

                    {if empty($list)}

                    <tr class="yg5_tr2">

                        <td colspan="12">

                            暂无积分信息

                        </td>

                    </tr>

                    {/if}





                </table>

            </div>

        </div>

    </div>

</div>

<div class="text-right we7-margin-top">

    {$pager}

</div>





<!-- {template 'common/footer'} -->

<script type="text/javascript">

    $(function(){
         $("#frame-11").show();
        $("#yframe-11").addClass("wyactive");
        $(".check_all").click(function () {

            var checked = $(this).get(0).checked;

            $("input[type=checkbox]").attr("checked", checked);

        });

        $("input[name=btn_printall]").click(function () {

            var check = $("input[type=checkbox][class!=check_all]:checked");

            if (check.length < 1) {

                alert('请选择要删除的订单!');

                return false;

            }

            if (confirm("确认要删除选择的订单?")) {

                var id = new Array();

                check.each(function (i) {

                    id[i] = $(this).val();

                });

                var url = "{php echo $this->createWebUrl('user', array('op' => 'delete', 'id' => $row['id']))}";

                $.post(

                        url,

                        {idArr: id},

                        function (data) {

                            alert(data.error);

                            location.reload();

                        }, 'json'

                );

            }

        });

        // var all = $("#allCheckBox");

        // var oInp = $("input[type=checkbox]")

        // //全选的复选框加点击事件

        // all.click(function(){

        //     for (var i = 0; i < oInp.length; i++) {

        //         oInp[i].checked = all.checked;

        //     }

        // })



        // //2.根据商品前的复选框是否选中来决定全选的复选框是否选中

        // //完成效果：所有商品前的复选框选中时，才能全选的复选框选中

        // /*思路：①for循环 判断每个商品前的复选框是否选中

        //   ②if判断 如果*/

        //   //for循环

        // for (var i = 0; i < oInp.length; i++) {

        //     oInp[i].click(function(){

        //         var k = 0;

        //         for (var i = 0; i < oInp.length; i++) {

        //             if(oInp[i].checked == false){

        //                 k = 1;

        //                 break;

        //             }

        //         }



        //         if(k == 0){

        //             all.checked = true;

        //         }else{

        //             all.checked = false;

        //         }

        //     })

        // }//for循环结束符

    })

</script>

